/**
 * Created with IntelliJ IDEA.
 * Description:BOKD
 * User: 34321
 * Date: 2024-11-05
 * Time: 6:20
 */
public class Student {
    //实例成员变量
    public int age;
    public int score;
    public String gender;
    public String name;
    public static int classandgrade;

    public Student(){
        System.out.println("I am a computer major student");
    }

    //实例代码块
    {
        this.score = 59;
        this.name = "xiaoxin";
        this.gender = "boy";
        this.age = 19;
        this.classandgrade = 241;
        System.out.println("I am a computer major student");
    }

//    // 静态代码块
//        static
//    {
//        classandgrade = 241;
//        System.out.println("I am a computer major student");
//    }

    public void show(){
        System.out.println("name："+name+"gender:"+gender+"age:"+age+"classandgrade:"+classandgrade);
    }


    public static void main(String[] args) {
            Student student = new Student();
            student.show();
    }

}

